package com.company.lanqiao;

import java.util.*;

public class Compression {

    public static void main(String[] args) {


        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        long[] nums = new long[n];

        long[] res = new long[n];

        for (int i = 0; i < n; i++) {
            nums[i] = sc.nextLong();
        }
        long l = System.currentTimeMillis();
        // map记录 数值-最后一次下标
        HashMap<Long,Integer> map = new HashMap<>();

        boolean[] flag = new boolean[n + 1];

        for (int i = 0; i < nums.length; i++) {

            if (!map.containsKey(nums[i])) {
                //未出现
                res[i] = -1 * nums[i];
                flag[i] = true;
            }else {
                int j = map.get(nums[i]);
                int sum = 0;
                for (;j <=i;j++) {
                    if (flag[j]) sum++;
                }
                // 除去自身
                res[i] = sum - 1;
                flag[i] = true;
                flag[j] = false;

            }
            map.put(nums[i],i);
        }

        for (int i = 0; i < res.length; i++) {
            if (i == res.length - 1) {
                System.out.print(res[i]);
            } else {
                System.out.print(res[i] + " ");
            }
        }

    }
}
